#! /bin/ksh
# Constant-velocity stack of a range of cmp gathers
# Authors: Jack, Ken
# NOTE: Comment lines preceeding user input start with  #!#
set -x

### From Cvstack
stackdata=cvstack
integer cdpmin=601 cdpmax=610
fold=30
space=1
integer vmin=1500   dv=150


### Plot the common velocity stacked data
integer ncdp=cdpmax-cdpmin+1
f2=$vmin
d2=$(bc -l <<-END
	$dv/($ncdp + $space)
END)

sugain <$stackdata tpow=2.0 gpow=.5 |
suximage perc=99 f2=$f2 d2=$d2 \
	title="File: $input  Constant-Velocity Stack " \
	label1="Time (s)"  label2="Velocity (m/s)" & 
